-classlevel([{class1,1}]).

-vmt([{class1,[{method1,2,class1},{method2,2,class1}]}]).

-classlevel([{class2,2}]).

-vmt([{class2,[{method1,2,class1},{method2,2,class2}]}]).

-file("./pattern1.erl", 1).

-file("./class1.class.hrl", 1).

-file("../../ect/include/ect.hrl", 1).

-file("./class1.class.hrl", 2).

-file("./pattern1.erl", 3).

-file("./class2.class.hrl", 1).

-file("../../ect/include/ect.hrl", 1).

-file("./class2.class.hrl", 2).

-file("./pattern1.erl", 4).

a0(Obj) ->
    begin
        _CCTRANS_0 =
            begin
                _CCTRANS_1 = Obj,
                class1 = element(1, element(2, _CCTRANS_1)),
                element(3, _CCTRANS_1)
            end,
        class2 = element(2, element(2, _CCTRANS_0)),
        element(4, _CCTRANS_0)
    end.

d0(A) ->
    setelement(4, A, 2),
    setelement(5, A, 2),
    setelement(6, A, 2).

demo(Obj) ->
    begin
        _CCTRANS_3 = _CCTRANS_2 = Obj,
        class1 = element(1, element(2, _CCTRANS_2)),
        5 = element(3, _CCTRANS_2),
        B = element(4, _CCTRANS_2),
        _CCTRANS_3
    end,
    B.

demo2(Obj)
    when
        (is_record(Obj, class1, 5)
         orelse
         fail)
        and
        (element(3, Obj) =:= 5) ->
    begin
        _CCTRANS_5 = _CCTRANS_4 = Obj,
        class1 = element(1, element(2, _CCTRANS_4)),
        5 = element(3, _CCTRANS_4),
        B = element(4, _CCTRANS_4),
        _CCTRANS_5
    end,
    B.

demo3(Obj) ->
    begin
        _CCTRANS_8 = [_,_CCTRANS_6,_CCTRANS_7|_] = Obj,
        class2 = element(2, element(2, _CCTRANS_7)),
        B = element(8, _CCTRANS_7),
        class1 = element(1, element(2, _CCTRANS_6)),
        5 = element(3, _CCTRANS_6),
        A = element(4, _CCTRANS_6),
        _CCTRANS_8
    end.

demo4(Obj) ->
    begin
        _CCTRANS_10 = _CCTRANS_9 = Obj,
        class1 = element(1, element(2, _CCTRANS_9)),
        {A,B} = element(3, _CCTRANS_9),
        A = element(4, _CCTRANS_9),
        _CCTRANS_10
    end.

demo5(Obj) ->
    begin
        _CCTRANS_12 = _CCTRANS_11 = Obj,
        class1 = element(1, element(2, _CCTRANS_11)),
        begin
            _CCTRANS_14 = _CCTRANS_13 = element(3, _CCTRANS_11),
            class2 = element(2, element(2, _CCTRANS_13)),
            {5,B} = element(6, _CCTRANS_13),
            _CCTRANS_14
        end,
        A = element(4, _CCTRANS_11),
        _CCTRANS_12
    end.

clausedemo1(A = {_,_CCTRANS_15}, C)
    when
        class1 =:= element(1, element(2, _CCTRANS_15)),
        C =:= element(5, _CCTRANS_15) ->
    B = element(4, _CCTRANS_15),
    A - B + C.

module_info() ->
    erlang:get_module_info(pattern1).

module_info(X) ->
    erlang:get_module_info(pattern1, X).

